package java04;
import java.util.Scanner;
import java.util.Arrays;
class Rectangle{
	private int width;
	private int length;
	
	public Rectangle(int width, int length){
		this.width = width;
		this.length = length;
	}

	
	public String toString() {
		return String.format("Rectangle [width=" + width + ", length=" + length + "]");
	}
	
	public int getPerimeter(){ 
		return (length+width)*2;
	}
	
	public int getArea(){
		return (length*width);
	}
}	
	
	
class Circle{
	private int radius;
	
	public Circle(int radius){
		this.radius = radius;
	}
	
	@Override
	public String toString() {
		return "Circle [radius=" + radius + "]";
	}
	public int getPerimeter(){
		return (int) (2*(Math.PI)*radius);
	}
	public int getArea(){
		return (int)((Math.PI)*radius*radius);
	}
}

public class Main1 {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		Rectangle[] rectangle = new Rectangle[2];
		Circle[] circle = new Circle[2];
		for(int j = 0;j<rectangle.length;j++){
			Rectangle rectangles = new Rectangle(sc.nextInt(),sc.nextInt());
			rectangle[j] = rectangles;
		}
		for(int j = 0;j<circle.length;j++){
			Circle circles = new Circle(sc.nextInt());
			circle[j] = circles;
		}
		System.out.println(rectangle[0].getPerimeter()+rectangle[1].getPerimeter()+circle[0].getPerimeter()+circle[1].getPerimeter());
		System.out.println(rectangle[0].getArea()+rectangle[1].getArea()+circle[0].getArea()+circle[1].getArea());
		System.out.println(Arrays.deepToString(rectangle));
		System.out.println(Arrays.deepToString(circle));
	}
}

